package com.example.test.service.责任连;


public abstract class AbstractBean {

    private AbstractBean next;

    public void setNext(AbstractBean next){
        this.next = next;
    }

    public abstract boolean dohandel();

    public Boolean start(){
        boolean dohandel = this.dohandel();
        if (dohandel && this.next !=null) {
            this.next.start();
        }
        return true;
    }

}
